package com.jinsi.service.yrf;


import com.jinsi.pojo.SyUser;
import com.jinsi.pojo.Role;
import com.jinsi.pojo.UserRole;

import java.util.List;

public interface UserService {

    public SyUser getUserByNameAndPwd(String userName);
    public SyUser getUserByPhone(String userPhone);

    List<UserRole> listByUserId(int userId);

    /**
     * 添加用户
     * @param syUser
     * @return 用户id
     * @throws Exception
     */
    Integer addUser(SyUser syUser) throws Exception;

    Role selectById(int roleId);

    /**
     * 添加用户权限
     * @param userId
     * @return 用户id
     * @throws Exception
     */
    Integer addUserRole(Integer userId) throws Exception;
}
